#ifndef LOGINLOGMANAGER_H
#define LOGINLOGMANAGER_H

#include "Entity/LoginInfo.h"
#include "api/systemManager/LogManager/loginlogapi.h"
#include <QObject>
#include <Utils.h>
#include <ui_index.h>
#include <Entity/DictData.h>

class LoginLogManager : public QObject
{
    Q_OBJECT
public:
    explicit LoginLogManager(Ui::Index *ui,QObject *parent = nullptr);
private slots:
    void pageSizeChanged(int index);
    void deleteByIds();
private:
    Ui::Index *ui;
    Utils utils;
    int pageSize = 10;
    int total;
    int totalPage;
    int currentPage = 1;
    QList<DictData> sys_common_status;
    QList<LoginInfo> logList;
    LoginLogApi api;

    void init();
    void getType();
    void initSearchArea();
    void getList();
    void initTable();
    void initPageInfo();
};

#endif // LOGINLOGMANAGER_H
